home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / DiceSource / master / Examples / Printer_Driver / data.c next >
C/C++ Source or Header  |  1994-02-01  |  10KB  |  216 lines

  1.  
  2. /*
  3.  *  DATA.C
  4.  *
  5.  *  David Berezowski - March/88.
  6.  *  Modified for DICE - May/91    Matthew Dillon
  7.  *
  8.  *  Copyright (c) 1988  Commodore-Amiga, Inc.
  9.  *  (c)Copyright 1991 Matthew Dillon
  10.  */
  11.  
  12. #include "defs.h"
  13.  
  14. Prototype const char *CommandTable[];
  15.  
  16. const char *CommandTable[] ={
  17.     "\377",         /* 00 aRIS reset                        */
  18.     "\377",         /* 01 aRIN initialize                   */
  19.     "\377",         /* 02 aIND linefeed                     */
  20.     "\012\015",     /* 03 aNEL CRLF                         */
  21.     "\377",         /* 04 aRI reverse LF            (NI)    */
  22.  
  23.             /* 05 aSGR0 normal char set        */
  24.     "\0335\033-\376\033F",
  25.     "\0334",        /* 06 aSGR3 italics on                  */
  26.     "\0335",        /* 07 aSGR23 italics off                */
  27.     "\033-\001",    /* 08 aSGR4 underline on                */
  28.     "\033-\376",    /* 09 aSGR24 underline off              */
  29.     "\033E",        /* 10 aSGR1 boldface on                 */
  30.     "\033F",        /* 11 aSGR22 boldface off               */
  31.     "\377",         /* 12 aSFC set foreground color (NI)    */
  32.     "\377",         /* 13 aSBC set background color (NI)    */
  33.     "\377",         /* 14 aSHORP0 normal pitch              */
  34.     "\377",         /* 15 aSHORP2 elite on                  */
  35.     "\377",         /* 16 aSHORP1 elite off                 */
  36.     "\377",         /* 17 aSHORP4 condensed fine on         */
  37.     "\377",         /* 18 aSHORP3 condensed fine off        */
  38.     "\033W\001",    /* 19 aSHORP6 enlarge on                */
  39.     "\033W\376",    /* 20 aSHORP5 enlarge off               */
  40.  
  41.     "\033q\002",    /* 21 aDEN6 shadow print on             */
  42.     "\033q\376",    /* 22 aDEN5 shadow print off            */
  43.     "\033G",        /* 23 aDEN4 double strike on            */
  44.     "\033H",        /* 24 aDEN3 double strike off           */
  45.     "\033x\001",    /* 25 aDEN2 NLQ on                      */
  46.     "\033x\376",    /* 26 aDEN1 NLQ off                     */
  47.  
  48.     "\377",         /* 27 aSUS2 superscript on              */
  49.     "\377",         /* 28 aSUS1 superscript off             */
  50.     "\377",         /* 29 aSUS4 subscript on                */
  51.     "\377",         /* 30 aSUS3 subscript off               */
  52.     "\377",         /* 31 aSUS0 normalize the line          */
  53.     "\377",         /* 32 aPLU partial line up      (NI)    */
  54.     "\377",         /* 33 aPLD partial line down    (NI)    */
  55.  
  56.     "\033R\376",    /* 34 aFNT0 Typeface 0                  */
  57.     "\033R\001",    /* 35 aFNT1 Typeface 1                  */
  58.     "\033R\002",    /* 36 aFNT2 Typeface 2                  */
  59.     "\033R\003",    /* 37 aFNT3 Typeface 3                  */
  60.     "\033R\004",    /* 38 aFNT4 Typeface 4                  */
  61.     "\033R\005",    /* 39 aFNT5 Typeface 5                  */
  62.     "\033R\006",    /* 40 aFNT6 Typeface 6                  */
  63.     "\033R\007",    /* 41 aFNT7 Typeface 7                  */
  64.     "\033R\010",    /* 42 aFNT8 Typeface 8                  */
  65.     "\033R\011",    /* 43 aFNT9 Typeface 9                  */
  66.     "\033R\012",    /* 44 aFNT10 Typeface 10                */
  67.  
  68.     "\033p1",       /* 45 aPROP2 proportional on            */
  69.     "\033p0",       /* 46 aPROP1 proportional off           */
  70.     "\377",         /* 47 aPROP0 proportional clear    (NI) */
  71.     "\377",         /* 48 aTSS set proportional offset (NI) */
  72.     "\033a\376",    /* 49 aJFY5 auto left justify           */
  73.     "\033a\002",    /* 50 aJFY7 auto right justify          */
  74.     "\033a\003",    /* 51 aJFY6 auto full jusitfy           */
  75.     "\033a\376",    /* 52 aJFY0 auto jusity off             */
  76.     "\377",         /* 53 aJFY3 letter space           (NI) */
  77.     "\033a\001",    /* 54 aJFY1 word fill                   */
  78.     "\377",         /* 55 aVERP0 1/8" line spacing          */
  79.     "\377",         /* 56 aVERP1 1/6" line spacing          */
  80.     "\377",         /* 57 aSLPP set form length             */
  81.     "\377",         /* 58 aPERF perf skip n (n > 0)         */
  82.     "\033O",        /* 59 aPERF0 perf skip off              */
  83.  
  84.     "\377",         /* 60 aLMS set left margin         (NI) */
  85.     "\377",         /* 61 aRMS set right margin        (NI) */
  86.     "\377",         /* 62 aTMS set top margin          (NI) */
  87.     "\377",         /* 63 aBMS set bottom margin       (NI) */
  88.     "\377",         /* 64 aSTBM set T&B margins        (NI) */
  89.     "\377",         /* 65 aSLRM set L&R margins             */
  90.     "\377",         /* 66 aCAM clear margins                */
  91.  
  92.     "\377",         /* 67 aHTS set horiz tab                */
  93.     "\377",         /* 68 aVTS set vert tab                 */
  94.     "\377",         /* 69 aTBC0 clear horiz tab             */
  95.     "\033D\376",    /* 70 aTBC3 clear all horiz tabs        */
  96.     "\377",         /* 71 aTBC1 clear vert tab              */
  97.     "\377",         /* 72 aTBC4 clear all vert tabs         */
  98.     "\033D\376",    /* 73 aTBCALL clear all h & v tabs      */
  99.             /* 74 aTBSALL set default tabs        */
  100. "\033D\010\020\030\040\050\060\070\100\110\120\130\140\150\160\170\200\376",
  101.  
  102.     "\377",         /* 75 aEXTEND extended commands         */
  103.     "\377",         /* 76 aRAW next 'n' chars are raw       */
  104. };
  105.  
  106. char *ExtendedCharTable[] = {
  107.     " ",                                    /* NBSP*/
  108.     "\033R\007[\033R\\0",                   /* i */
  109.     "c\010|",                               /* c| */
  110.     "\033R\003#\033R\\0",                   /* L- */
  111.     "\033R\005$\033R\\0",                   /* o */
  112.     "\033R\010\\\\\033R\\0",                /* Y- */
  113.     "|",                                    /* | */
  114.     "\033R\002@\033R\\0",                   /* SS */
  115.  
  116.     "\033R\001~\033R\\0",                   /* " */
  117.     "c",                                    /* copyright */
  118.     "\033S\\0a\010_\033T",                  /* a_ */
  119.     "<",                                    /* << */
  120.     "~",                                    /* - */
  121.     "-",                                    /* SHY */
  122.     "r",                                    /* registered trademark */
  123.     "-",                                    /* - */
  124.  
  125.     "\033R\001[\033R\\0",                   /* degrees */
  126.     "+\010_",                               /* +_ */
  127.     "\033S\\0002\033T",                     /* 2 */
  128.     "\033S\\0003\033T",                     /* 3 */
  129.     "'",                                    /* ' */
  130.     "u",                                    /* u */
  131.     "P",                                    /* reverse P */
  132.     "\033S\\000.\033T",                     /* . */
  133.  
  134.     ",",                                    /* , */
  135.     "\033S\\0001\033T",                     /* 1 */
  136.     "\033R\001[\033R\\0\010-",              /* o_ */
  137.     ">",                                    /* >> */
  138.     "\033S\\0001\033T\010-\010\033S\0014\033T",     /* 1/4 */
  139.     "\033S\\0001\033T\010-\010\033S\0012\033T",     /* 1/2 */
  140.     "\033S\\0003\033T\010-\010\033S\0014\033T",     /* 3/4 */
  141.     "\033R\007]\033R\\0",                   /* upside down ? */
  142.  
  143.     "A\010`",                               /* `A */
  144.     "A\010'",                               /* 'A */
  145.     "A\010^",                               /* ^A */
  146.     "A\010~",                               /* ~A */
  147.     "\033R\002[\033R\\0",                   /* "A */
  148.     "\033R\004]\033R\\0",                   /* oA */
  149.     "\033R\004[\033R\\0",                   /* AE */
  150.     "C\010,",                               /* C, */
  151.  
  152.     "E\010`",                               /* `E */
  153.     "\033R\011@\033R\\0",                   /* 'E */
  154.     "E\010^",                               /* ^E */
  155.     "E\010\033R\001~\033R\\0",              /* "E */
  156.     "I\010`",                               /* `I */
  157.     "I\010`",                               /* 'I */
  158.     "I\010^",                               /* ^I */
  159.     "I\010\033R\001~\033R\\0",              /* "I */
  160.  
  161.     "D\010-",                               /* -D */
  162.     "\033R\007\\\\\033R\\0",                /* ~N */
  163.     "O\010`",                               /* `O */
  164.     "O\010'",                               /* 'O */
  165.     "O\010^",                               /* ^O */
  166.     "O\010~",                               /* ~O */
  167.     "\033R\002\\\\\033R\\0",                /* "O */
  168.     "x",                                    /* x */
  169.  
  170.     "\033R\004\\\\\033R\\0",                /* 0 */
  171.     "U\010`",                               /* `U */
  172.     "U\010'",                               /* 'U */
  173.     "U\010^",                               /* ^U */
  174.     "\033R\002]\033R\\0",                   /* "U */
  175.     "Y\010'",                               /* 'Y */
  176.     "T",                                    /* Thorn */
  177.     "\033R\002~\033R\\0",                   /* B */
  178.  
  179.     "\033R\001@\033R\\0",                   /* `a */
  180.     "a\010'",                               /* 'a */
  181.     "a\010^",                               /* ^a */
  182.     "a\010~",                               /* ~a */
  183.     "\033R\002{\033R\\0",                   /* "a */
  184.     "\033R\004}\033R\\0",                   /* oa */
  185.     "\033R\004{\033R\\0",                   /* ae */
  186.     "\033R\001\\\\\033R\\0",                /* c, */
  187.  
  188.     "\033R\001}\033R\\0",                   /* `e */
  189.     "\033R\001{\033R\\0",                   /* 'e */
  190.     "e\010^",                               /* ^e */
  191.     "e\010\033R\001~\033R\\0",              /* "e */
  192.     "\033R\006~\033R\\0",                   /* `i */
  193.     "i\010'",                               /* 'i */
  194.     "i\010^",                               /* ^i */
  195.     "i\010\033R\001~\033R\\0",              /* "i */
  196.  
  197.     "d",                                    /* d */
  198.     "\033R\007|\033R\\0",                   /* ~n */
  199.     "\033R\006|\033R\\0",                   /* `o */
  200.     "o\010'",                               /* 'o */
  201.     "o\010^",                               /* ^o */
  202.     "o\010~",                               /* ~o */
  203.     "\033R\002|\033R\\0",                   /* "o */
  204.     ":\010-"                                /* :- */
  205.  
  206.     "\033R\004|\033R\\0",                   /* o/ */
  207.     "\033R\001|\033R\\0",                   /* `u */
  208.     "u\010'",                               /* 'u */
  209.     "u\010^",                               /* ^u */
  210.     "\033R\002}\033R\\0",                   /* "u */
  211.     "y\010'",                               /* 'y */
  212.     "t",                                    /* thorn */
  213.     "y\010\033R\001~\033R\\0"               /* "y */
  214. };
  215.  
  216.